package com.gz.dto;

import java.util.Date;
import java.io.Serializable;

import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import com.gz.utils.DataFmtUtil;

/**
 * 试卷用户关系表(PaperUser)实体参数类
 *
 * @author jhk
 * @since 2024-09-26 00:56:46
 */
@Data
@ApiModel("PaperUser实体参数类")
public class PaperUserDto extends PageInfoDto implements Serializable {
    private static final long serialVersionUID = 655803605333774592L;
    private Integer id;
    @ApiModelProperty("卷子id")
    private String paperId;
    @ApiModelProperty("用户id")
    private String userId;
    @ApiModelProperty("创建人id")
    private Integer crtId;
    @ApiModelProperty("创建时间")
    private Date crtDt;
    @ApiModelProperty("更新人id")
    private Integer optId;
    @ApiModelProperty("更新时间")
    private Date optDt;
    @ApiModelProperty("状态  1:已发卷未答卷  2:已答卷")
    private Integer status;
    @ApiModelProperty("排序字段")
    private String orderField;
    @ApiModelProperty("排序类型")
    private String orderType;

    public String getOrderField() {
        if (!StringUtils.isEmpty(orderField)) {
            return DataFmtUtil.xX2x_x(orderField);
        }
        return orderField;
    }
}

